fix: block Node 24 WASM crash path#159
Conversation
|
I am relatively new to working with WASM in Node, but blocking this crash path makes sense as a safety measure. Just curious, why did you choose to handle the Node 24 crash path this specific way? Either way, I agree with the approach here. |
…-24-conflicts # Conflicts: # package-lock.json # package.json # src/bin/node-version-check.ts
|
Thanks for the thorough work here, @zaidazmi — the repro, the override env var, and the unit coverage were all solid. Unfortunately this has been overtaken by a different architecture for the same crash, and the specific direction (block Node 24+) now conflicts with how CodeGraph ships. What changed: the Node-24 turboshaft WASM Why blocking Node 24+ no longer works:
Closing as superseded — this reflects the architecture shift, not the quality of the PR. Genuinely appreciate the contribution and hope you'll send more. 🙏 |
Summary
Repro
On Node v24.13.0, before this fix, the extraction suite crashed during grammar compilation with
Fatal process out of memory: Zone. Node v20.19.4 completes the same extraction suite successfully.Test plan
npx vitest run __tests__/node-version-check.test.tsnpm run buildnode dist/bin/codegraph.js --versionon Node v24.13.0 exits with the unsupported-runtime bannerCODEGRAPH_ALLOW_UNSAFE_NODE=1 node dist/bin/codegraph.js --versionon Node v24.13.0 prints the banner and versionPATH="/Users/zaidazmi/.nvm/versions/node/v20.19.4/bin:/Users/zaidazmi/.codex/tmp/arg0/codex-arg0N0CH7a:/Users/zaidazmi/.bun/bin:/Users/zaidazmi/.antigravity/antigravity/bin:/Users/zaidazmi/.opencode/bin:/Users/zaidazmi/.nvm/versions/node/v24.13.0/bin:/Users/zaidazmi/.rbenv/shims:/Users/zaidazmi/.local/pipx/venvs/pip/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/zaidazmi/.rbenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/zaidazmi/.cargo/bin:/Users/zaidazmi/.local/bin:/Users/zaidazmi/Library/Android/sdk/emulator:/Users/zaidazmi/Library/Android/sdk/platform-tools:/Users/zaidazmi/.local/bin:/opt/homebrew/opt/fzf/bin:/Users/zaidazmi/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" npm run buildPATH="/Users/zaidazmi/.nvm/versions/node/v20.19.4/bin:/Users/zaidazmi/.codex/tmp/arg0/codex-arg0N0CH7a:/Users/zaidazmi/.bun/bin:/Users/zaidazmi/.antigravity/antigravity/bin:/Users/zaidazmi/.opencode/bin:/Users/zaidazmi/.nvm/versions/node/v24.13.0/bin:/Users/zaidazmi/.rbenv/shims:/Users/zaidazmi/.local/pipx/venvs/pip/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/zaidazmi/.rbenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/zaidazmi/.cargo/bin:/Users/zaidazmi/.local/bin:/Users/zaidazmi/Library/Android/sdk/emulator:/Users/zaidazmi/Library/Android/sdk/platform-tools:/Users/zaidazmi/.local/bin:/opt/homebrew/opt/fzf/bin:/Users/zaidazmi/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" npm test